aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/mass test client/Commands/Inventory/GiveAllCommand.cs
blob: 8890ea0cc43242b69483f53fa47f4233f6c63b06 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System;
using System.Collections.Generic;
using System.Text;
using libsecondlife;
using libsecondlife.Packets;

namespace libsecondlife.TestClient
{
    public class GiveAllCommand: Command
    {
		public GiveAllCommand(TestClient testClient)
		{
			Name = "giveAll";
			Description = "Gives you all it's money.";
		}

        public override string Execute(string[] args, LLUUID fromAgentID)
		{
			if (fromAgentID == null)
				return "Unable to send money to console.  This command only works when IMed.";

		    int amount = Client.Self.Balance;
		    Client.Self.GiveMoney(fromAgentID, Client.Self.Balance, String.Empty);
		    return "Gave $" + amount + " to " + fromAgentID;
		}
    }
}